From: Jonas Dreßler Date: Fri, 1 Mar 2024 16:24:37 +0000 (+0100) Subject: status/network: Sync active connections again on connection-added X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~1^2~45 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=723c0a6e6183ea3488798e8bc0467d74bf93170a;p=gnome-shell.git status/network: Sync active connections again on connection-added NetworkManagers NmClient has a bug for wireguard connections where the notify::active-connections and connection-added are emitted in the wrong order: When a wireguard connection gets activated, notify::active-connections is emitted first, then connection-added happens. We currently expect these signals to emitted in the correct order, so our VPN toggle is not actually updated when a wireguard connection is established. Until this bug is fixed in NetworkManager, work it around by calling _syncActiveConnections() manually after we see ::connection-added. NM issue: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1483 Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6656 Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index a263b41c7..dad668358 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1597,6 +1597,10 @@ class NMVpnToggle extends NMToggle { 'activation-failed', () => this.emit('activation-failed'), this); this._addItem(connection, item); + + // FIXME: NM is emitting "connection-added" after "notify::active-connections", + // so we need to sync connections here once again. + this._syncActiveConnections(); } _removeConnection(connection) {